package com.bwie.system.sync;

import com.bwie.common.domain.Data1;
import com.bwie.common.domain.Data2;
import com.bwie.common.domain.Data3;
import com.bwie.system.mapper.Data1Mapper;
import com.bwie.system.mapper.Data2Mapper;
import com.bwie.system.mapper.Data3Mapper;
import com.bwie.system.producer.DataProducer;
import com.bwie.system.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName:
 * @Description:
 * @Author: zengfanzhen
 * @Date: 2024/4/12 21:16:35
 */
@Component
public class DataProcessingTask {

    @Autowired
    private DataProducer dataProducer;

    // 每隔1分钟执行一次任务
    @Scheduled(cron = "0 0/1 * * * *")
    public void produceData() {
        // 调用 DataProducer 类中的发送数据方法
//        dataProducer.sendData1(); // 发送 Data1 数据
//        dataProducer.sendData2(); // 发送 Data2 数据
//        dataProducer.sendData3(); // 发送 Data3 数据

    }

}
